package cn.com.xf.web.form;

import java.text.SimpleDateFormat;

import org.hibernate.validator.constraints.NotEmpty;

import cn.com.xf.domain.TblSiteJob;

public class JobForm extends BaseForm {

	private String id;
	private String job;
	@NotEmpty(message = "职位名称不能为空")
	private String jobName;
	private String publicTime;
	@NotEmpty(message = "招聘人数不能为空")
	private String totalCount;
	@NotEmpty(message = "工作地点不能为空")
	private String workAddress;
	private String workAge;
	private String workEdu;
	private String workFunction;
	private String workLanguage;
	private String workPay;
	@NotEmpty(message = "薪酬福利不能为空")
	private String workWelfare;
	@NotEmpty(message = "职位描述不能为空")
	private String describe;
	private String workPlace;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getJob() {
		return job;
	}

	public void setJob(String job) {
		this.job = job;
	}

	public String getJobName() {
		return jobName;
	}

	public void setJobName(String jobName) {
		this.jobName = jobName;
	}

	public String getPublicTime() {
		return publicTime;
	}

	public void setPublicTime(String publicTime) {
		this.publicTime = publicTime;
	}

	public String getTotalCount() {
		return totalCount;
	}

	public void setTotalCount(String totalCount) {
		this.totalCount = totalCount;
	}

	public String getWorkAddress() {
		return workAddress;
	}

	public void setWorkAddress(String workAddress) {
		this.workAddress = workAddress;
	}

	public String getWorkAge() {
		return workAge;
	}

	public void setWorkAge(String workAge) {
		this.workAge = workAge;
	}

	public String getWorkEdu() {
		return workEdu;
	}

	public void setWorkEdu(String workEdu) {
		this.workEdu = workEdu;
	}

	public String getWorkFunction() {
		return workFunction;
	}

	public void setWorkFunction(String workFunction) {
		this.workFunction = workFunction;
	}

	public String getWorkLanguage() {
		return workLanguage;
	}

	public void setWorkLanguage(String workLanguage) {
		this.workLanguage = workLanguage;
	}

	public String getWorkPay() {
		return workPay;
	}

	public void setWorkPay(String workPay) {
		this.workPay = workPay;
	}

	public String getWorkWelfare() {
		return workWelfare;
	}

	public void setWorkWelfare(String workWelfare) {
		this.workWelfare = workWelfare;
	}

	public String getDescribe() {
		return describe;
	}

	public void setDescribe(String describe) {
		this.describe = describe;
	}

	public TblSiteJob copyTo() throws Exception {
		TblSiteJob job = new TblSiteJob();
		job.setJobName(this.jobName);
		job.setPublicTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(this.publicTime));
		job.setDateStr(this.publicTime);
		job.setTotalCount(this.totalCount);
		job.setWorkAddress(this.workAddress);
		job.setWorkAge(this.workAge);
		job.setWorkEdu(this.workEdu);
		// job.setWorkFunction(this.workFunction);
		job.setWorkLanguage(this.workLanguage);
		job.setWorkPay(this.workPay);
		job.setWorkWelfare(this.workWelfare);
		job.setDescribe(this.describe);
		job.setWorkPlace(this.workPlace);
		return job;
	}

	public String getWorkPlace() {
		return workPlace;
	}

	public void setWorkPlace(String workPlace) {
		this.workPlace = workPlace;
	}

}
